export default function LoadingOrError({error}) {
    if (error) {
        return (
            <div className='min-h-screen flex items-center justify-center'>
                <h1 className='text-xl' data-testid='LoadingOrError'>
                    {error ? error.message : 'Loading...'}
                </h1>
            </div>
        )
    } else {
        return <div className='min-h-screen flex items-center justify-center'>
            <section style={{position: "relative"}}>
                <div className="wrapper">
                    <div className="inner" style={{display: "flex",justifyContent: "center",alignItems: "center"}}>
                        <span>L</span>
                        <span>o</span>
                        <span>a</span>
                        <span>d</span>
                        <span>i</span>
                        <span>n</span>
                        <span>g</span>
                    </div>
                </div>
            </section>
        </div>
    }
}
LoadingOrError.defaultProps = {
    error: undefined
}
